package com.wicket.okrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.QuestionService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrapp.integration.FwAppQuestionClient;
import com.wicket.okrapp.integration.dto.QueryQuestionDetailComRespDto;
import com.wicket.okrapp.integration.dto.QueryQuestionDetailComReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrapp.integration.dto.UpdateQuestionComRespDto;
import com.wicket.okrapp.integration.dto.UpdateQuestionComReqDto;
import com.wicket.okrapp.integration.dto.QueryQuestionListComRespDto;
import com.wicket.okrapp.integration.dto.QueryQuestionListComReqDto;
import com.wicket.okrapp.integration.FwAppVirtualOrgClient;
import com.wicket.okrapp.integration.dto.BatchQueryVirtualOrgMemberComBorderRespDto;
import com.wicket.okrapp.integration.dto.BatchQueryVirtualOrgMemberComBorderReqDto;
import com.wicket.okrframework.integration.FwBaseNullClient;
import com.wicket.okrframework.integration.dto.BatchQueryUserinfoRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryUserinfoReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffQuestionDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrapp.integration.dto.DeleteQuestionRespDto;
import com.wicket.okrapp.integration.dto.DeleteQuestionReqDto;
import com.wicket.okrapp.integration.dto.ArchiveQuestionRespDto;
import com.wicket.okrapp.integration.dto.ArchiveQuestionReqDto;
import com.wicket.okrapp.integration.dto.UpdateQuestionBusinessProcessingComRespDto;
import com.wicket.okrapp.integration.dto.UpdateQuestionBusinessProcessingComReqDto;
import com.wicket.okrapp.integration.dto.AddQuestionBusinessProcessingComRespDto;
import com.wicket.okrapp.integration.dto.AddQuestionBusinessProcessingComReqDto;
import com.wicket.okrapp.integration.FwAppWorkTasksClient;
import com.wicket.okrapp.integration.dto.ImplementAsyncRefreshWorkContOverdueRelateComRespDto;
import com.wicket.okrapp.integration.dto.ImplementAsyncRefreshWorkContOverdueRelateComReqDto;
import com.wicket.okrapp.integration.dto.WorkTaskObjectTypeDto;
import com.wicket.okrapp.integration.dto.DeleteQuestionBusinessProcessingComRespDto;
import com.wicket.okrapp.integration.dto.DeleteQuestionBusinessProcessingComReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComReqDto;
import com.wicket.okrapp.integration.dto.ObtainMainBodyObjectComRespDto;
import com.wicket.okrapp.integration.dto.ObtainMainBodyObjectComReqDto;
import com.wicket.okrbff.common.exception.BizException;
import com.wicket.okrapp.integration.dto.SetQuestionHangUpRespDto;
import com.wicket.okrapp.integration.dto.SetQuestionHangUpReqDto;
import com.wicket.okrapp.integration.dto.SetQuestionTurnDownRespDto;
import com.wicket.okrapp.integration.dto.SetQuestionTurnDownReqDto;
import com.wicket.okrframework.integration.FwBaseBatchClient;
import com.wicket.okrframework.integration.dto.ImplementLifeCycleJudgmentComRespDto;
import com.wicket.okrframework.integration.dto.ImplementLifeCycleJudgmentComReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffVirtualOrgMemberDto;
import com.wicket.okrcomponent.integration.FwCompConfSchemeClient;
import com.wicket.okrcomponent.integration.dto.QueryConfItemMatchAnswerDetailComRespDto;
import com.wicket.okrapp.integration.dto.QueryConfItemMatchAnswerDetailComReqDto;
import com.wicket.okrapp.integration.dto.BusAppDocRelaDto;
import com.wicket.okrapp.integration.FwAppDataSetSingleEntryClient;
import com.wicket.okrapp.integration.dto.ImplementPicSingleSetDataEntryComRespDto;
import com.wicket.okrapp.integration.dto.ImplementPicSingleSetDataEntryComReqDto;
import com.wicket.okrapp.integration.FwAppMessageClient;
import com.wicket.okrapp.integration.dto.BottomUpdateNumberContentStatusMessagesComRespDto;
import com.wicket.okrapp.integration.dto.BottomUpdateNumberContentStatusMessagesComReqDto;
import com.wicket.okrcomponent.integration.FwCompDataSetSingleEntryClient;
import com.wicket.okrcomponent.integration.dto.ImplementSingleSetDataEntryComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementSingleSetDataEntryComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "Question", tags = { "Question" })
@RestController
// @RequestMapping("/oms/question/")
public class QuestionController {

  @Autowired
  QuestionService questionService;
/**
   * B3查询问题详情
   * gen by moon at 11/8/2023, 4:07:27 PM
   */
    @PostMapping("/oms/question/queryQuestionDetail")
    @ApiOperation(value = "B3查询问题详情", response = OkrResult.class)
    public OkrResult<BffQueryQuestionDetailRespDto> queryQuestionDetail(@RequestBody(required=false) @Validated BffQueryQuestionDetailReqDto reqDTO){
        return OkrResult.success(questionService.queryQuestionDetail(reqDTO));
    }
/**
   * B3修改问题
   * gen by moon at 11/8/2023, 4:24:19 PM
   */
    @PostMapping("/oms/question/updateQuestion")
    @ApiOperation(value = "B3修改问题", response = OkrResult.class)
    public OkrResult<BffUpdateQuestionRespDto> updateQuestion(@RequestBody(required=false) @Validated BffUpdateQuestionReqDto reqDTO){
        return OkrResult.success(questionService.updateQuestion(reqDTO));
    }
/**
   * B3查问题列表
   * gen by moon at 11/8/2023, 4:24:22 PM
   */
    @PostMapping("/oms/question/queryQuestionList")
    @ApiOperation(value = "B3查问题列表", response = OkrResult.class)
    public OkrResult<BffQueryQuestionListRespDto> queryQuestionList(@RequestBody(required=false) @Validated BffQueryQuestionListReqDto reqDTO){
        return OkrResult.success(questionService.queryQuestionList(reqDTO));
    }
/**
   * B3删除问题
   * gen by moon at 11/8/2023, 4:24:35 PM
   */
    @PostMapping("/oms/question/deleteQuestion")
    @ApiOperation(value = "B3删除问题", response = OkrResult.class)
    public OkrResult<BffDeleteQuestionRespDto> deleteQuestion(@RequestBody(required=false) @Validated BffDeleteQuestionReqDto reqDTO){
        return OkrResult.success(questionService.deleteQuestion(reqDTO));
    }
/**
   * B3存档问题
   * gen by moon at 11/8/2023, 4:24:38 PM
   */
    @PostMapping("/oms/question/archiveQuestion")
    @ApiOperation(value = "B3存档问题", response = OkrResult.class)
    public OkrResult<BffArchiveQuestionRespDto> archiveQuestion(@RequestBody(required=false) @Validated BffArchiveQuestionReqDto reqDTO){
        return OkrResult.success(questionService.archiveQuestion(reqDTO));
    }
/**
   * B3新增问题
   * gen by moon at 11/10/2023, 3:57:39 PM
   */
    @PostMapping("/oms/question/addQuestion")
    @ApiOperation(value = "B3新增问题", response = OkrResult.class)
    public OkrResult<BffAddQuestionRespDto> addQuestion(@RequestBody(required=false) @Validated BffAddQuestionReqDto reqDTO){
        return OkrResult.success(questionService.addQuestion(reqDTO));
    }
/**
   * B3设问题挂起
   * gen by moon at 11/11/2023, 2:16:52 AM
   */
    @PostMapping("/oms/question/setQuestionHangUp")
    @ApiOperation(value = "B3设问题挂起", response = OkrResult.class)
    public OkrResult<BffSetQuestionHangUpRespDto> setQuestionHangUp(@RequestBody(required=false) @Validated BffSetQuestionHangUpReqDto reqDTO){
        return OkrResult.success(questionService.setQuestionHangUp(reqDTO));
    }
/**
   * B3设问题拒绝
   * gen by moon at 11/11/2023, 2:16:59 AM
   */
    @PostMapping("/oms/question/setQuestionTurnDown")
    @ApiOperation(value = "B3设问题拒绝", response = OkrResult.class)
    public OkrResult<BffSetQuestionTurnDownRespDto> setQuestionTurnDown(@RequestBody(required=false) @Validated BffSetQuestionTurnDownReqDto reqDTO){
        return OkrResult.success(questionService.setQuestionTurnDown(reqDTO));
    }
}
